package com.tencent.sr.iris.activity.service.util;

import com.tencent.sr.iris.activity.domain.event.dto.ActivityDTO;
import com.tencent.sr.iris.activity.domain.event.dto.ActivityTaskDTO;
import com.tencent.sr.iris.activity.interfaces.response.activity.ActivityAndTaskResponse;
import com.tencent.sr.iris.activity.interfaces.response.activity.TaskResponse;
import com.tencent.sr.iris.activity.repository.entity.TIrisActivityDO;
import com.tencent.sr.iris.activity.repository.entity.TIrisActivityTaskDO;
import com.tencent.sr.iris.activity.repository.entity.TIrisUserTaskBatchDataDO;
import com.tencent.sr.iris.activity.repository.entity.TIrisUserTaskRecordDO;
import java.util.List;

import com.tencent.sr.iris.activity.service.event.vo.TIrisUserTaskBatchDataVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface BeanConvertUtil {

    BeanConvertUtil INSTANCE = Mappers.getMapper(BeanConvertUtil.class);

    ActivityDTO convertActivityDO2DTO(TIrisActivityDO activityDO);

    ActivityTaskDTO convertActivityTaskDO2DTO(TIrisActivityTaskDO taskDO);

    List<ActivityTaskDTO> convertActivityTaskDO2DTOList(List<TIrisActivityTaskDO> taskDOList);

    @Mapping(target = "id", ignore = true)
    TIrisUserTaskBatchDataDO convertTaskRecordDO2BatchDataDO(TIrisUserTaskRecordDO taskRecordDO);

    @Mapping(target = "id", ignore = true)
    TIrisUserTaskBatchDataVO convertTaskRecordDO2BatchDataVO(TIrisUserTaskRecordDO taskRecordDO);

    @Mapping(target = "id", ignore = true)
    TaskResponse convertTaskDO2TaskResponse(TIrisActivityTaskDO taskRecordDO);

    @Mapping(target = "id", ignore = true)
    ActivityAndTaskResponse convertActivityDO2Response(TIrisActivityDO activityDO);

}
